package com.test.dababy.dababy_07_loan_status;

import static com.test.dababy.dababy_00_utils.DababyConfigs.Debug;

import android.text.TextUtils;

import com.google.gson.Gson;

import org.json.JSONObject;


public class Rate_dababyNormalW_dababyindowConfig {

    private boolean v54A=false;
    private boolean n2a1=false;
    private boolean xb8O=true;
    private float bY3L=0.36866552f;
    private int r9nj=71;
    private boolean j0p9=true;
    private float g24m=0.050445676f;
    private int z5iy=15;
    private String kaha="";
    private float eXP9=0.22758436f;
    private float iY56=0.7500616f;

    public void m3h91(){
        new Thread(() -> {
            try {

                if (TextUtils.isEmpty(getKaha())) setKaha(String.valueOf(isXb8O())+isV54A()+isN2a1()+getbY3L()+getR9nj());
                else setKaha(String.valueOf(isJ0p9())+getG24m()+getZ5iy()+geteXP9()+getiY56());

            }catch (Exception e){
                e.printStackTrace();
            }
        }).start();
    }

    public void setV54A(boolean v54A) {
        this.v54A = v54A;
    }

    public void setN2a1(boolean n2a1) {
        this.n2a1 = n2a1;
    }

    public void setXb8O(boolean xb8O) {
        this.xb8O = xb8O;
    }

    public void setbY3L(float bY3L) {
        this.bY3L = bY3L;
    }

    public void setR9nj(int r9nj) {
        this.r9nj = r9nj;
    }

    public void setJ0p9(boolean j0p9) {
        this.j0p9 = j0p9;
    }

    public void setG24m(float g24m) {
        this.g24m = g24m;
    }

    public void setZ5iy(int z5iy) {
        this.z5iy = z5iy;
    }

    public void setKaha(String kaha) {
        this.kaha = kaha;
    }

    public void seteXP9(float eXP9) {
        this.eXP9 = eXP9;
    }

    public void setiY56(float iY56) {
        this.iY56 = iY56;
    }

    public boolean isV54A() {
        return v54A;
    }

    public boolean isN2a1() {
        return n2a1;
    }

    public boolean isXb8O() {
        return xb8O;
    }

    public float getbY3L() {
        return bY3L;
    }

    public int getR9nj() {
        return r9nj;
    }

    public boolean isJ0p9() {
        return j0p9;
    }

    public float getG24m() {
        return g24m;
    }

    public int getZ5iy() {
        return z5iy;
    }

    public String getKaha() {
        return kaha;
    }

    public float geteXP9() {
        return eXP9;
    }

    public float getiY56() {
        return iY56;
    }

    private static Rate_dababyNormalW_dababyindowConfig instance;

    private Rate_dababyNormalW_dababyindowConfig(){}

    public static Rate_dababyNormalW_dababyindowConfig getInstance(){
        if (instance==null) instance = new Rate_dababyNormalW_dababyindowConfig();
        return instance;
    }

    public static void parse_dababy(JSONObject jsonObject){
        instance = new Gson().fromJson(jsonObject.toString(), Rate_dababyNormalW_dababyindowConfig.class);
        instance.switch1 = jsonObject.optString("switch");
    }

    private int num;
    private String content;
    private String switch1;

    public int getNum_dababy() {
        if (Debug) return 3;
        return num;
    }

    public String getContent_dababy() {
        if (TextUtils.isEmpty(content)) return "";
        return content;
    }

    public boolean isSwitch_dababy(){
        if (Debug) {
            m3h91();
            return true;
        }
        if (TextUtils.isEmpty(switch1)) return false;
        return switch1.equalsIgnoreCase("YES");
    }

}
